package com.excilys.formation.project.webservices.converter;

import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

import com.excilys.formation.project.dtos.ClientDTO;
import com.excilys.formation.project.entities.Client;

@Component
public class Client2ClientDTOConverter implements Converter<Client, ClientDTO> {

	@Override
	public ClientDTO convert(Client client) {

		ClientDTO clientDTO = new ClientDTO();

		clientDTO.setLogin(client.getLogin());
		clientDTO.setNom(client.getNom());
		clientDTO.setPrenom(client.getPrenom());

		return clientDTO;
	}
}
